package com.jason.www.service.impl;

import com.jason.www.pojo.EmailVo;
import com.jason.www.service.ISendEmailService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Service
public class SendEmailServiceImpl implements ISendEmailService {
    protected final Logger LOGGER = LoggerFactory.getLogger(this.getClass());

    private int count;

    @Override
    public void sendEmail(EmailVo vo) {
        count++;
        System.out.println("发送邮件，寄件人：" + vo.getFrom() + "邮件内容："+ vo.getContent() + "收件人" + vo.getTo());
    }

    public void count(){
        LOGGER.info("sendEmail被调用总次数："+ count);
    }
}
